package net.dopan.pigframe.discovery.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceCanceledEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;

/***
 * @Package: net.dopan.pigframe.discovery.listener
 * @Title: InstanceCancelListener
 * @Description: 服务停止
 * @author: 刘宽
 * @date: 2018/8/31 10:50
 */
@Configuration
@Slf4j
public class InstanceCancelListener implements ApplicationListener<EurekaInstanceCanceledEvent> {
    @Override
    public void onApplicationEvent(EurekaInstanceCanceledEvent event) {
        log.info("服务:{}挂了", event.getAppName());
    }
}
